﻿// =================================================================== 
// 项目说明
//====================================================================
// lsc。@Copy Right 2019
// 文件： NetworkOrderRejectDic.cs
// 项目名称：斑马车务
// 创建时间：2019/1/23
// 负责人：lsc
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using Dapper.Extensions;
using CGT.Infrastructure.Entity;
using CGT.Infrastructure.Repository;
using CGT.Infrastructure.Dto;

namespace CGT.Infrastructure.Service
{

    /// <summary>
    ///
    /// </summary>
    public class NetworkOrderRejectDicService
    {
        protected NetworkOrderRejectDicRepository repository;

        public NetworkOrderRejectDicService()
        {
            repository = new NetworkOrderRejectDicRepository();
        }

        #region 增删改查

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        public object Insert(NetworkOrderRejectDic entity) { return repository.Insert(entity); }

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        public object Insert(List<NetworkOrderRejectDic> entitys) { return repository.Insert(entitys); }

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        public bool Update(NetworkOrderRejectDic entity) { return repository.Update(entity); }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        public bool Delete(NetworkOrderRejectDic entity) { return repository.Delete(entity); }

        /// <summary>
        /// 删除所有
        /// </summary>
        /// <returns></returns>
        public bool DeleteAll() { return repository.DeleteAll(); }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public bool Delete(int primaryKey) { return repository.Delete(primaryKey); }

        /// <summary>
        /// 查询单个实体
        /// </summary>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public NetworkOrderRejectDic SingleOrDefault(object primaryKey) { return repository.SingleOrDefault(primaryKey); }


        /// <summary>
        /// 查询单个实体,如果存在多条则引发异常
        /// </summary>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public NetworkOrderRejectDic Single(object primaryKey) { return repository.Single(primaryKey); }

        /// <summary>
        /// 查询所有
        /// </summary>
        /// <returns></returns>
        public List<NetworkOrderRejectDic> QueryAll()
        {
            return repository.QueryAll();
        }

        #endregion

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public Page<NetworkOrderRejectDicDto> GetPages(long pageIndex, long pageSize, int masterBizTypeId, int bizTypeId)
        {
            return repository.GetPages(pageIndex, pageSize, masterBizTypeId, bizTypeId);
        }

        /// <summary>
        /// 获取单数据信息
        /// </summary>
        /// <param name="dicId"></param>
        /// <returns></returns>
        public NetworkOrderRejectDicInterfaceDto GetInfoById(int dicId)
        {
            return repository.GetInfoById(dicId);
        }

        /// <summary>
        /// 获取单数据信息
        /// </summary>
        /// <param name="dicId"></param>
        /// <returns></returns>
        public List<NetworkOrderRejectDic> GetListByBizId(int bizId)
        {
            return repository.GetListByBizId(bizId);
        }
    }
	
}